﻿package com.tudou.ad.data
{
    import com.tudou.ad.consts.*;

    public class AdItemInfo extends Object implements IAdItemInfo
    {
        public var _st:int = 0;
        private var _su:String = "";
        private var _cl:String = "";
        private var _oid:int = 0;
        private var _type:int = 0;
        private var _mtype:int = 0;
        private var _ufo:String = "";
        private var _price:Number = 0;
        public var _videoUrl:String = "";
        private var _title:String = "";
        private var _scu:String = "";
        private var _jsUrl:String = "";
        private var _nielson:Boolean = false;
        private var _aid:int = 0;
        public var _fLink:String = "";
        private var _mode:int = 0;
        public var _orderPos:int = 0;
        public var _hd:int = 0;
        public var _seu:String = "";
        private var _url:String = "";
        public var _fTitle:String = "";
        private var _id:int = 0;
        public var _backUrl:String = "";
        private var _durationType:int = 0;
        private var _link:String = "";
        private var _duration:int = 0;
        public var _durationEffective:int = 0;

        public function AdItemInfo(param1:XML, param2:XML = null)
        {
            var _loc_4:Array = null;
            if (param1 == null)
            {
                return;
            }
            type = param1.@type;
            aid = param1.@aid;
            link = param1.@lk;
            id = param1.@id;
            nielson = param1.@n == 1;
            oid = param1.@oid;
            price = param1.@p;
            duration = param1.@d;
            durationType = param1.@dt;
            su = param1.@su;
            scu = param1.@scu;
            ufo = param1.@ufo;
            title = param1.@title;
            mtype = param1.@mtype;
            mode = param1.@mode;
            jsUrl = param1.@m;
            cl = param1.@cl;
            st = int(param1.@st);
            seu = param1.@seu;
            durationEffective = int(param1.@de);
            hd = int(param1.@hd);
            var _loc_3:* = param1.text().toString();
            if (mtype == AdMaterType.VIDEO)
            {
                _loc_4 = _loc_3.split("|");
                url = _loc_4[1] || "";
                backUrl = _loc_4[2] || "";
                videoUrl = _loc_4[0];
            }
            else if (type == AdType.FRONT || type == AdType.BACK)
            {
                _loc_4 = _loc_3.split("|");
                url = _loc_4[0];
                backUrl = _loc_4[2] || "";
            }
            else
            {
                url = _loc_3;
            }
            fTitle = param1.@ftitle;
            fLink = param1.@flink;
            if (param2 != null)
            {
                backUrl = param2.text().toString();
            }
            return;
        }// end function

        public function set ufo(param1:String) : void
        {
            _ufo = param1;
            return;
        }// end function

        public function get videoUrl() : String
        {
            return _videoUrl;
        }// end function

        public function get backUrl() : String
        {
            return _backUrl;
        }// end function

        public function get hd() : int
        {
            return _hd;
        }// end function

        public function set fLink(param1:String) : void
        {
            _fLink = param1;
            return;
        }// end function

        public function get id() : int
        {
            return _id;
        }// end function

        public function set backUrl(param1:String) : void
        {
            _backUrl = param1;
            return;
        }// end function

        public function set fTitle(param1:String) : void
        {
            _fTitle = param1;
            return;
        }// end function

        public function get scu() : String
        {
            return _scu;
        }// end function

        public function get orderPos() : int
        {
            return _orderPos;
        }// end function

        public function get mtype() : int
        {
            return _mtype;
        }// end function

        public function set duration(param1:int) : void
        {
            _duration = param1;
            return;
        }// end function

        public function get type() : int
        {
            return _type;
        }// end function

        public function get aid() : int
        {
            return _aid;
        }// end function

        public function set id(param1:int) : void
        {
            _id = param1;
            return;
        }// end function

        public function set mode(param1:int) : void
        {
            _mode = param1;
            return;
        }// end function

        public function get price() : Number
        {
            return _price;
        }// end function

        public function set orderPos(param1:int) : void
        {
            _orderPos = param1;
            return;
        }// end function

        public function set mtype(param1:int) : void
        {
            _mtype = param1;
            return;
        }// end function

        public function get title() : String
        {
            return _title;
        }// end function

        public function set nielson(param1:Boolean) : void
        {
            _nielson = param1;
            return;
        }// end function

        public function get su() : String
        {
            return _su;
        }// end function

        public function get seu() : String
        {
            return _seu;
        }// end function

        public function get st() : int
        {
            return _st;
        }// end function

        public function set scu(param1:String) : void
        {
            _scu = param1;
            return;
        }// end function

        public function get jsUrl() : String
        {
            return _jsUrl;
        }// end function

        public function get cl() : String
        {
            return _cl;
        }// end function

        public function get durationEffective() : int
        {
            return _durationEffective;
        }// end function

        public function set type(param1:int) : void
        {
            _type = param1;
            return;
        }// end function

        public function get url() : String
        {
            return _url;
        }// end function

        public function set aid(param1:int) : void
        {
            _aid = param1;
            return;
        }// end function

        public function get isVideo() : Boolean
        {
            return mtype == AdMaterType.VIDEO;
        }// end function

        public function get fLink() : String
        {
            return _fLink;
        }// end function

        public function set price(param1:Number) : void
        {
            _price = param1;
            return;
        }// end function

        public function get fTitle() : String
        {
            return _fTitle;
        }// end function

        public function set oid(param1:int) : void
        {
            _oid = param1;
            return;
        }// end function

        public function get mode() : int
        {
            return _mode;
        }// end function

        public function get duration() : int
        {
            return _duration;
        }// end function

        public function get nielson() : Boolean
        {
            return _nielson;
        }// end function

        public function set st(param1:int) : void
        {
            _st = param1;
            return;
        }// end function

        public function set su(param1:String) : void
        {
            _su = param1;
            return;
        }// end function

        public function set seu(param1:String) : void
        {
            _seu = param1;
            return;
        }// end function

        public function set title(param1:String) : void
        {
            _title = param1;
            return;
        }// end function

        public function get oid() : int
        {
            return _oid;
        }// end function

        public function set cl(param1:String) : void
        {
            _cl = param1;
            return;
        }// end function

        public function set jsUrl(param1:String) : void
        {
            _jsUrl = param1;
            return;
        }// end function

        public function set durationType(param1:int) : void
        {
            _durationType = param1;
            return;
        }// end function

        public function set url(param1:String) : void
        {
            _url = param1;
            return;
        }// end function

        public function set durationEffective(param1:int) : void
        {
            _durationEffective = param1;
            return;
        }// end function

        public function get durationType() : int
        {
            return _durationType;
        }// end function

        public function set videoUrl(param1:String) : void
        {
            _videoUrl = param1;
            return;
        }// end function

        public function set link(param1:String) : void
        {
            _link = param1;
            return;
        }// end function

        public function set hd(param1:int) : void
        {
            _hd = param1;
            return;
        }// end function

        public function get link() : String
        {
            return _link;
        }// end function

        public function get ufo() : String
        {
            return _ufo;
        }// end function

    }
}
